import { connect } from 'react-redux'
import ExChangeStatistics from '../../../../views/My/MyUtils/DebtManagement/ExChangeStatistics'

function mapStateToProps(state: any) {
    return {
        userInfo: state.user.userInfo,
        userDebt: state.user.userDebt,
        userDebtManagerID: state.user.userDebtManagerID,
        userDebtExchangeList: state.user.userDebtExchangeList,
    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        'SET_MYUTILS_DEBT': (data: any) => {
            dispatch({ type: 'SET_MYUTILS_DEBT', data })
        },
        'SET_MYUTILS_DEPT_ZWMANAGEID': (data: any) => {
            dispatch({ type: 'SET_MYUTILS_DEPT_ZWMANAGEID', data })
        },
        'SET_MYUTILS_DEBTEXCHANGELIST': (data: any) => {
            dispatch({ type: 'SET_MYUTILS_DEBTEXCHANGELIST', data })
        },
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(ExChangeStatistics)